'''
Created on 2011-9-6

@author: hehengyi
'''
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.template import RequestContext

def index(request, template_name="index.html"):
   
    return render_to_response(template_name, locals(), RequestContext(request))

def hello(request):
    values = request.META.items()
    values.sort()
    html = []
    #for k, v in values:
    #html.append('<tr><td>%s</td><td>%s</td></tr>' % (k, v))
    return HttpResponse('<table>%s</table>' % '\n'.join(html))

from django.shortcuts import render_to_response

import os
def search_form(request):
    books="frewf",
    query=123
    a=4444
    a3 = 555
    #b=os.path.dirname(__file__)
    b =os.path.abspath(os.curdir)
    return render_to_response('search_form.html',locals(),RequestContext(request))

def d(request):
    
    return render_to_response('category.html',locals())
    
from django.conf import settings


